package it.sebsibenal.client;

import it.sebsibenal.client.pages.SongEditor;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.i18n.client.Dictionary;
import com.google.gwt.user.client.ui.RootPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class Folk_project implements EntryPoint {

	/**
	 * This is the entry point method.
	 */
	public void onModuleLoad() {
		System.out.println("MODULE LOADED!");
		Dictionary dictionary = Dictionary.getDictionary("pageInfo");
		String pageName = dictionary.get("name");
		if (pageName==null || pageName.trim().length()==0) {
			System.out.println("Nessun parametro di pagina impostato!");
		} else {
			if (SongEditor.PAGE_NAME.equals(pageName)) {
				RootPanel.get("content-panel").setWidth("1015px");
				RootPanel.get("content-panel").setHeight("650px");
				SongEditor songEditor = new SongEditor("Simone");
				RootPanel.get("content-panel").add(songEditor);
				songEditor.go();
			}
		}

	}

}
